{% if messages %}
    {% for message in messages %}
    <script>
        Swal.fire({
            toast: true,
            position: "top-end",
            icon: "{{ message.tags }}",
            title: "{{ message }}",
            showConfirmButton: false,
            timer:2000,
            timerProgressBar: true,
        });
    </script>
    {% endfor %}
{% endif %}